<h1 class="OptionGroupTitle" style="width: 100%;">Novo Endereço</h1>
<% form_remote_tag(:update => "resultado",
                  :url => { :action => :buscar_por_cep },
                  :loading => "Element.show('search-indicator')",
                  :complete => "Element.hide('search-indicator')") do |form| %>
  <%= error_messages_for "logradouro" %>
  <fieldset class="FieldArea">
  <legend class="FieldAreaTitle">Buscar Endereço</legend>
    <table class="ControlTable" width="100%" border="0">
      <tr>
        <td class="FormField" style="width: 20%;"  colspan="4">
          <%= label :logradouro, :cep, "CEP do Logradouro" %><br />
          <%= text_field :logradouro, :cep, :size => 20, :class => 'TextField' %>
        </td>
        <td style="width: 80%; text-align: left;" colspan="80"><br/>
          <%= submit_tag 'Localizar', { :class => 'CommandButton IconSearch'} %>
          <%= image_tag("/resources/pictures/icons/sefaz/icon-12x12-spinner.gif" , :id => 'search-indicator', :style => 'display:none') %>
        </td>
      </tr>
      </table>
  </fieldset>
  <div id="resultado"></div>
<% end %>
<br/>
<%= link_to 'Voltar', enderecos_path %>